<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        /* window.navigator对象包含有关访问者浏览器的信息 */
        var str = "";
        str += "<p>浏览器的代号："+ navigator.appCodeName +"</p>";
        str += "<p>浏览器的名称："+ navigator.appName +"</p>";
        str += "<p>浏览器的版本："+ navigator.appVersion +"</p>";
        str += "<p>硬件平台："+ navigator.platform +"</p>";
        str += "<p>用户代理："+ navigator.userAgent +"</p>";
        str += "<p>启用Cookies:"+ navigator.cookieEnabled +"</p>";

        document.write(str);

    </script>
</body>
</html>